import React, {Component} from 'react'
import styles from './Greeter.css'
class GreeterSon extends Component {
	constructor() {
		super()
		this.state = {
			name: 'tab1'
		};
	}
	tabChange(){
		this.props.setReed(this.props.item.name)
	}

	render() {
		let name = this.props.name;
		return (
			<div
			onClick={this.tabChange.bind(this)}
			className = {this.props.item.name== name?styles.active:''}
			>{this.props.item.name}</div>
		)
	}
}

export default GreeterSon
